﻿using System.Web.Mvc;
using ZSoftInstagram.UI.Web.Infrastructure.AppEvents.BaseControllers;
using ZSoftInstagram.Services.Abstraction;
using System.Threading.Tasks;
using System.Drawing;

namespace ZSoftInstagram.UI.Web.Controllers
{
    public class HomeController : BaseController
    {
        private IImagePinSuggestionProvider _provider;

        public HomeController(IImagePinSuggestionProvider suggestionProvider)
        {
            this._provider = suggestionProvider;
        }

        [Authorize]
        public async Task<ActionResult> Index()
        {
            var model = await this._provider.ProviderByUserIdAsync(this.CurrentUserId);
            
            return View(model);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }
        
        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";
            
            return View();
        }
    }
}